/* gcc -fPIC -c -O3 -Wall pong.c && gcc -shared -Wl -o pong.so pong.o  */

#include "../NewSyndrome-module.h"

void
module_init (void)
{
  bot_set_auteur_module ("Thaeron");
  bot_set_desc_module ("Pong");
  bot_set_version_module ("0.1");
  bot_set_ident_module ("pong");
  bot_add_type_handler ("PING", "pong");
}

#ifdef WIN32
void
init_dep (char *nom, void *addr)
{
  init_share_dep (nom, addr);
}
#endif

int
pong (msg * i)
{
  char buffer[51];
/*  log_module_info ("Ping ? Pong"); */
  bot_actualise_ping ();
  snprintf (buffer, 50, "PONG :%s\n", i->argu[0]);
  buffer[50]=0;
  bot_send_raw (buffer);
  return 0;
}
